<script setup>
import { EditPen, Delete } from '@element-plus/icons-vue'
import { ref, reactive, getCurrentInstance, onMounted, h } from "vue"
const instance = getCurrentInstance();
const _this = instance.appContext.config.globalProperties //vue3获取当前this

// 组件中使用，接收传参的
let propsData = defineProps({
  row: {
    type: Object,
    default: {}
  }
})

const algorithmIcon = ref([
  {icon: require("@/assets/image/ico_algorithm1.png"), icon_no: require("@/assets/image/ico_algorithm_no1.png")},
  {icon: require("@/assets/image/ico_algorithm2.png"), icon_no: require("@/assets/image/ico_algorithm_no2.png")},
  {icon: require("@/assets/image/ico_algorithm3.png"), icon_no: require("@/assets/image/ico_algorithm_no3.png")},
  {icon: require("@/assets/image/ico_algorithm4.png"), icon_no: require("@/assets/image/ico_algorithm_no4.png")},
  {icon: require("@/assets/image/ico_algorithm5.png"), icon_no: require("@/assets/image/ico_algorithm_no5.png")},
]);

function iconShow(type){
  return propsData.row.algorithmType.indexOf(type) > -1;
}

</script>
<template>
  <div class="algorithm_type">
    <div class="img_item">
      <img :src="algorithmIcon[row.type - 1].icon" alt="" >
    </div>
  </div>
</template>
<style lang="less" scoped>
.algorithm_type{
  display: flex;
  align-items: center;
  .img_item{
    width: 24px;
    height: 24px;
    img{
      width: 100%;
      height: 100%;
    }
  }
}
</style>